<?php

/***  DOCUMENTATION LAYER

CEO SimpleTest Reporter

Last Update: Sep 2007
Author: Tom at klenwell@gmail.com

SUMMARY
  Extend SimpleTest HtmlReporter to show passes

NOTES
  source: http://simpletest.org/en/display_subclass_tutorial.html

______________________________________________________________________________*/


if (! defined('SIMPLE_TEST')) define('SIMPLE_TEST', 'simpletest/');
require_once(SIMPLE_TEST . 'reporter.php');

class CeoReporter extends HtmlReporter 
{
  function ShowPasses() 
  {
    $this->HtmlReporter();
  }
  
  function paintPass($message) 
  {
    parent::paintPass($message);
    print "<span class=\"pass\"><span class='star'>&#9733;</span>Pass</span>: ";
    $breadcrumb = $this->getTestList();
    array_shift($breadcrumb);
    print implode("->", $breadcrumb);
    print "->$message<br />\n";
  }
  
  function _getCss() 
  {
    $pass_css = <<<CSS

.pass { color: green; }
.pass .star { color:gold; padding-right:4px; }
body { font-family:monospace; font-size:12px; }
h1, h6 { font-family:sans-serif; }
h6 { font-size:11px }

CSS;
    return parent::_getCss() . $pass_css;
  }
}
?>